<div ng-controller="detailLiveCtrl">
    <div class="wrap">
        <div class="row" style="background: #f4f4f4">
            <div class="col-xs-12 col-sm-8">
                <!--图文直播和视频直播判断-->
                <!--图文直播头部-->
                <div ng-if="liveImgOrVedioObj.length<1" class="livdeta_art" style="background: #ffffff">
                    <!--<div  class="livdeta_art_img">banner图</div>-->
                    <div><img src="{{liveDetail.main.config.appBannerUrl||'static/45.png'}}" style="height: 1.9rem;width: 100%"></div>
                    <div class="liveDetailTitlTex">
                        <div class="topMain"><span>{{currenLiveData.title}}</span></div>
                        <div class="bottonMain" style="overflow: hidden;">
                            <div style="float: left;width: 60%;">
                                <span class="liveDeaBag">直播中</span>
                                <span>{{currenLiveData.countClickInitial}}人参与</span>
                            </div>
                            <div style="float: left;width: 40%">
                                <ul class="detailFiconList">
                                    <li ng-click="detailAddPrase()"><img src="{{detailAddPraseImagSmall}}">
                                        <span>{{liveDetail.main.countPraise}}赞</span>
                                    </li>
                                    <li ng-click="detailAddStor()" style="position: relative"><img src="{{detailAddStorImagSmall}}">
                                        <span>收藏</span>
                                        <div class="detailFiconListLine detailFiconListLineLf"></div>
                                        <div class="detailFiconListLine detailFiconListLineRt"></div>
                                    </li>
                                    <li  style="position: relative" href="{{detailData.shareUrl}}"><a><img src="static/10.png"></a>
                                        <span>分享</span>
                                        <div class="bdsharebuttonbox" style="position: absolute;top:0;width: 100%;height: 100%">
                                            <a class="bds_more" data-cmd="more" style="display: inline-block;width: 86px;opacity: 0"></a>
                                        </div>
                                    </li>
                                </ul>
                            </div>
                        </div>
                    </div>
                </div>
                <!--视频直播 头部-->
                <div ng-if="liveImgOrVedioObj.length>0"  class="livdeta_video">
                    <!--直播中-->
                    <div ng-if="liveDetailStatus==1">
                        <!--有直播流-->
                        <div ng-if="streamCurrentStatus==1">
                            <!--直播中有流ng-if="Number(streamCurrentStatus)==1" -->
                            <div class="live_vedio" style="width: 100%;height: 100%;background: #000;position: relative;z-index:10;">
                                <div id="id_test_video" style="height:4rem"></div>
                            </div>
                        </div>
                        <!--直播中无流-->
                        <div ng-if="streamCurrentStatus!=1" style="position: relative;height: 4rem;">
                            <span class="otherStatusTitle">{{liveDetail.main.title}}</span>
                            <span class="otherStatus">直播员暂时离开</span>
                        </div>
                    </div>
                    <!--直播预告-->
                    <div ng-if="liveDetailStatus==0" style="position: relative">
                        <span class="otherStatusTitle">{{liveDetail.main.title}}</span>
                        <span class="otherStatus">直播将于{{liveDetailStartTime|cutSecond}}开始</span>
                    </div>
                    <!--直播结束-->
                    <div ng-if="liveDetailStatus==2">
                        <div ng-if="!webPlaybackUrl" style="position: relative">
                            <span class="otherStatusTitle">{{liveDetail.main.title}}</span>
                            <span class="otherStatus">直播已结束，稍后回来看精彩回放</span>

                        </div>
                        <div ng-if="webPlaybackUrl" class="otherStatus">
                            <!--有回放流播放直播回放-->
                            <div class="live_vedio" style="width: 100%;height: 100%;background: #000;position: relative;z-index:10;">
                                <div id="id_test_video" style="height:4rem"></div>
                            </div>
                            <!--<div id="id_test_video" style="height: 230px"></div>-->
                        </div>
                    </div>
                        <!--&lt;!&ndash;&lt;!&ndash;直播中无流&ndash;&gt;&ndash;&gt;-->
                        <!--&lt;!&ndash;<div ng-if="Number(streamCurrentStatus)!=Number(1)" class="otherStatus">&ndash;&gt;-->
                        <!--&lt;!&ndash;直播员暂时离开&ndash;&gt;-->
                        <!--&lt;!&ndash;</div>&ndash;&gt;-->
                    <!--</div>-->
                    <!--&lt;!&ndash;直播预告&ndash;&gt;-->
                    <!--<div ng-if="liveDetailStatus==0" class="otherStatus">-->
                        <!--直播将于{{liveDetailStartTime|cutSecond}}开始-->
                    <!--</div>-->
                    <!--&lt;!&ndash;直播结束&ndash;&gt;-->
                    <!--<div ng-if="liveDetailStatus==2">-->
                        <!--<div ng-if="!streamCurrentStatus">-->
                            <!--直播已结束，稍后回来看精彩回放-->
                        <!--</div>-->
                        <!--<div ng-if="streamCurrentStatus">-->
                            <!--回放直播视频-->
                        <!--</div>-->
                    <!--</div>-->
                    <!--定位-->
                    <div class="liveDetailTitlTex" style="overflow: hidden;background:#FFFFFF">
                        <div class="topMain">{{liveDetail.main.title}}
                            <div style="float:right"><span style="border: 1px solid #fc9105;padding: 2px 5px;color: #fc9105;font-size: 0.16rem;" ng-repeat="vedioChanList in liveImgOrVedioObj track by $index" ng-click="chanLivePath($index)">线路{{vedioChanList.$index+1}}</span></div>
                        </div>
                        <div class="bottonMain">
                            <div style="float: left;width: 60%;">
                                <span class="liveDeaBag">直播中</span>
                                <span>{{liveCountClick}}人参与</span>
                            </div>
                            <div style="float: left;width: 40%">
                                <ul class="detailFiconList">
                                    <li><img  ng-click="detailAddPrase()" src="static/thub.png">
                                        <span>{{currenLiveData.countPraise}}赞</span>
                                    </li>
                                    <li style="position: relative"><img ng-click="detailAddStor()" src="static/18.png">
                                        <span>收藏</span>
                                        <div class="detailFiconListLine detailFiconListLineLf"></div>
                                        <div class="detailFiconListLine detailFiconListLineRt"></div>
                                    </li>
                                    <li style="position: relative" href="{{detailData.shareUrl}}"><a><img src="static/10.png"></a>
                                        <span>分享</span>
                                        <div class="bdsharebuttonbox" style="position: absolute;top:0;width: 100%;height: 100%">
                                            <a class="bds_more" data-cmd="more" style="display: inline-block;width: 74px;height: 35px;opacity: 0"></a>
                                        </div>
                                    </li>
                                </ul>
                            </div>
                        </div>
                    </div>
                </div>
                <!--详情内容-->
                <div ng-include="'tpl/components/boradcast.html'"></div>

            </div>

            <!--聊天室-->
            <div class="col-xs-12 col-sm-4 chat" style="background: #ffffff;padding: 0.1rem;">
               <h4 class="chat_head">聊天室</h4>
                <div>
                    <!--//输入框-->
                    <div class="comm_header" style="overflow: hidden;">
                        <div style="overflow: hidden;padding: 0.2rem 0">
                            <div class="comm_input" style="width: 100%"><input id="commeInputs" type="text" placeholder="{{commeInputs}}"></div>
                        </div>
                        <div class="comm_heade_btn" style="float: right;overflow: hidden">
                            <button ng-click="sendComFistBtn()" style="padding: 5px 0.15rem;border: none;">发表</button>
                            <!--头部输入框上传图片-->
                            <div style="float:left">
                                <div style="width: 50px;" class="inputBg">
                                    <!-- 图片选择框 -->
                                    <form>
                                        <input id="file" type="file" onchange='PreviewImage(this)'  class="uploadInput" accept="image/*;capture=camera" multiple/>
                                    </form>
                                    <!-- 图片展示容器 -->
                                    <div class="img-cont imgCont"></div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <!--直播只有最新评论-->
                    <div class="comm_hot_con">
                        <!--根据点击热门和最新不同来调用不同接口----循环内容热门评论-->
                        <div ng-repeat="item in commenCon track by $index " class="comm_repeat">
                            <div class="comm_hot_phto"><p><img src="{{item.userIcon}}" alt=""></p></div>
                            <div class="comm_hot_conts">
                                <div class="comm_hot_main" style="">
                                    <div class="commt_con"><a class="complUserName">{{item.userName}}</a><span class="complUserTime">{{item.created}}</span></div>
                                    <div style="margin:0.05rem 0 0.15rem 0;color: #333333;">{{item.content}}</div>
                                    <div class="comm_interact">
                                        <p class="comm_interact_lf"><a ng-click="reportCom($event,item.userName)">举报</a></p>
                                        <div class="comm_interact_rt" ng-click="commPraiseAdd($event,$index,item.id)">
                                            <p class="comm_interact_rt_icon"><span><img src="static/thub.png"></span><span style="">{{item.countPraise||0}}</span></p>
                                            <p class="comm_interact_rt_replay"><a ng-click="replayCom($event,item.userName)">回复</a></p>
                                        </div>
                                    </div>
                                    <!--输入框显示与隐藏-->
                                    <div class="comm_con_input_par hideInput">
                                        <div class="comm_input_par"><input type="text"></div>
                                        <div class="comm_heade_btn" style="float: right">
                                            <button style="border: none;" ng-click="par_input_send($event,item.id,item.userName,item.userID)">发表</button>
                                            <!--回复的回复的输入框上传图片-->
                                            <div style="float:left">
                                                <div style="width: 50px;" class="inputBg">
                                                    <!-- 图片选择框 id="file" -->
                                                    <form>
                                                        <input type="file" onchange='PreviewImage(this)'  class="uploadInput" accept="image/*;capture=camera" multiple/>
                                                    </form>
                                                    <!-- 图片展示容器 -->
                                                    <div class="img-cont imgCont"></div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <!--点击举报文本域-->
                                    <div class="reportComText hideTextarea">
                                        <textarea name="" id=""  style="padding: 15px;width:100%;height: 100px;margin: 15px 0 "></textarea>
                                        <button ng-click="par_input_port_send($event,item.id,item.userName,item.userID)">提交</button>
                                    </div>
                                </div>
                                <!--回复-->
                                <div ng-repeat="reply in item.topDiscuss.list" class="comm_hot_reply">
                                    <div >
                                        <div id="commt_com_repla"><a>{{reply.userName}}</a></div>
                                        <div ng-click="replayCom(reply.id,reply.userName)" class="commt_com_repla_con">{{reply.content}}</div>
                                    </div>
                                    <div class="comm_interact">
                                        <p class="comm_interact_lf" ng-click="reportComReplay($event,reply.userName)"><a>举报</a></p>
                                        <div class="comm_interact_rt">
                                            <p class="comm_interact_rt_icon"><span><img src="static/thub.png"></span><span style="margin-left: 0.1rem">{{item.countPraise||0}}</span></p>
                                            <p class="comm_interact_rt_replay"><a href="" ng-click="replayCom($event,reply.userName)">回复</a></p>
                                        </div>
                                    </div>
                                    <!--输入框显示与隐藏-->
                                    <div class="comm_con_input_par hideInput">
                                        <div class="comm_input_par"><input type="text"></div>
                                        <div class="comm_heade_btn" style="float: right;">
                                            <button style="border: none;" ng-click="par_input_send($event,reply.id,reply.userName,reply.userID)">发表</button>
                                            <!--回复的回复的输入框上传图片-->
                                            <div style="float:left">
                                                <div style="width: 50px;" class="inputBg">
                                                    <!-- 图片选择框 id="file" -->
                                                    <form>
                                                        <input type="file" onchange='PreviewImage(this)'  class="uploadInput" accept="image/*;capture=camera" multiple/>
                                                    </form>
                                                    <!-- 图片展示容器 -->
                                                    <div class="img-cont imgCont"></div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <!--点击举报文本域-->
                                    <div class="reportComTextReply hideTextarea">
                                        <textarea name="" style="padding: 15px;width:100%;height: 100px;margin: 15px 0 "></textarea>
                                        <button ng-click="par_input_port_send($event,reply.id,reply.userName,reply.userID)">提交</button>
                                    </div>
                                </div>
                                <div ng-if="item.topDiscuss.list.length>2&&lunchaMorChilCom" ng-click="checkMorChildCom(item.id,$index)" class="com-childen-more">更多{{item.topDiscuss.list.length}}条回复 <span class="glyphicon glyphicon-chevron-right"></span></div>
                                <div ng-if="item.topDiscuss.list.length>2&&hasChildMorCom.index" class="com-childen-more">更多评论回复</div>
                                <!--<div ng-if="item.topDiscuss.list.length>=2&&hasNoChildMorCom.index" class="com-childen-more">没有更多评论回复</div>-->
                            </div>
                        </div>
                    </div>
                    <!--评论模态框-->
                    <!--<div id="commentModle" class="commentMod">-->

                    <!--</div>-->

                    <!--<div ng-if="hasMorCom" ng-click="LoadMoreCom()" class="btn btn-block com-more">加载更多 <img herf=""></div>-->
                    <!--<div ng-if="!hasMorCom" class="btn btn-block btn-primary com-more">没有更多评论</div>-->
                </div>
            </div>
        </div>
    </div>
    <!--回到顶部-->
    <div class="fiBtn">
        <div class="QRCode">
            <img src="static/32.png">
        </div>
        <div ng-show=true ng-click="refreshDetailAll()" class="refresh">
            <img src="static/34.png">
        </div>
        <div ng-show=true ng-click="goBackTop()" class="baToTop">
            <img src="static/33.png">
        </div>
    </div>
</div>
<style>
    /*上传图片图标背景*/
    .inputBg{
        background-image:url("static/52.png");
        /*background-size:30px 30px;*/
        background-repeat:no-repeat,no-repeat,no-repeat;
    }
    .otherStatus{
        line-height: 4rem;text-align: center;color: #FFFFFF;
        display: inline-block;
        width: 100%;
        line-height: 4rem;
        text-align: center;
        color: #FFFFFF;
        height: 100%;
        margin: 0 auto;
        font-size:18px;
        background: #000000;
    }
    .otherStatusTitle{
        position: absolute;
        top:15px;
        left:15px ;
        color: #FFFFFF;
        font-size:18px ;
    }
    .chat{

    }
    .chat h4{
        height: 30px;
        line-height:30px;
        color: #000;
        font-size: 20px;
        border-bottom: 1px solid #999999;
        padding: 10px 0;
        box-sizing: content-box;
    }
    #commeInputs{
        width: 100%;
        height: 40px;
        line-height: 40px;
        text-indent: 10px;
    }
    .comm_hot_phto{
        float: left;
        width: 0.4rem;
        height: 0.4rem;
    }
    .comm_hot_phto>p{
        width: 0.4rem;
        height: 0.4rem;
    }
    .comm_hot_phto>p>img{
        width: 0.4rem;
        height: 0.4rem;
        border-radius: 50%;
    }
    .comm_hot_conts{
        width: 80%;
        float: right;
    }
    .comm_hot_con>div:nth-of-type(1){
        border-top:1px solid #999999 ;
    }
    .comm_interact_lf{
        float: left;
        cursor: pointer;
    }
    .comm_interact_lf a{
        color: #999999;
    }
    .comm_interact_rt{
        float: right;
    }
    .comm_hot_con>div{
        overflow: hidden;
        margin-top: 0.2rem 0;
        border-bottom:1px solid #999999;
        padding: 0.1rem;
    }
    .comm_hot_con{
        margin-top: 0.1rem;
    }
    .comm_interact_rt_icon{
        float: left;
        cursor: pointer;
    }
    .comm_interact_rt_icon>span:nth-of-type(1){
        position: relative;
        top: 0.02rem;
    }
    .comm_interact_rt_icon>span:nth-of-type(2){
        margin-left: 0.05rem;
        color: #ccc;
    }
    .comm_interact_rt_replay a{
        color: #ccc;
        cursor: pointer;
    }
    .comm_interact_rt>p:nth-of-type(2){
        margin-left: 0.1rem;
    }
    .comm_interact_rt_replay{
        float: right;
    }
    /*.comm_interact{*/
        /*height: 30px;*/
        /*line-height: 30px;*/
    /*}*/
    .commt_con span{
        font-size: 0.14rem;
        text-decoration: none;
        color: #999999;
        padding-left: 0.2rem;
    }
    .topMain{
        font-size: 0.24rem;
    }
    .bottonMain{
        height: 30px;
        line-height:30px;
        padding:  0.15rem 0;
        box-sizing: content-box;
        font-size: 0.14rem;
    }
    .detailFiconList span{
        /*color: #999999;*/
    }
    .bottonMain span{
        color: #999999;
    }
    .liveDeaBag{
        border: 1px solid #fc9105;
        padding: 2px 5px;
        color: #fc9105 !important;
    }
    .live_gla_title_time{
        height: 30px;
        line-height: 30px;
        font-size: 0.20rem;
        color: #999999;
        padding: 0.1rem 0;
        box-sizing: content-box;
    }
    .detailFiconList span{
        color: #999999;
    }

    /*图片上传样式*/
    /*评论上传图片*/
    .uploadInput{
        padding: 0;
        height: 50px;
        width: 50px;
        opacity: 0;
    }
    .img-cont{
        width:200px;
        height: 100px;
        overflow: hidden;
        position: absolute;
        left: 48px;
    }

    .img-cont>div{
        position: relative;
        width:100%;
        height:100%;
        /*border:1px solid #777;*/
        float:left;
    }

    .img-cont>div>a{
        width:60px;
        height:30px;
        border-radius:4px;
        line-height: 30px;
        text-align: center;
        color:#fff;
        display: block;
        background: #317ef3;
        cursor: pointer;
        position: absolute;
        top: 0;
        right: 0;
    }
    /*评论图片*/
    .comm_hot_conts_img{
        width: 50%;
        height: 150px;

    }
    .comm_hot_conts_img_replay{
        box-sizing: content-box;
        padding: 0 0 15px 0;
        width:50%;
        /*height:7.28rem;*/
    }
    .comm_hot_conts_img img,.comm_hot_conts_img_replay img{
        width: 100%;
        height: 100%;
    }
    /*评论comment*/
    .comm_input{
        width: 92%;
        float: right;
    }
    .comm_input input{

        width: 100%;
        height: 45px;
        line-height: 45px;
        border: 1px solid #000000;
    }
    .comment{
        padding: 10px 15px;
        position: fixed;
        bottom: 0;
        width: 100%;;
        z-index: 20;
        display: none;
    }
    .comBtnOne{
        background: #ffffff;
        margin-left: 0;
        color: #666666;
        border:1px solid #e3e3e3;
    }
    .comBtnTwo{
        float: right;
        background: #ffffff;
        color: #fc9105;
        border:1px solid #fc9105;
    }
    .comment form{
        float: left;
        width: 60%;
    }
    .comment .conmReview{
        padding: 10px 0;
    }
    .comm_revi{
        overflow: hidden;
    }
    .conmReview .comm_tit{
        float: left;
    }
    .conmReview .comm_num{
        float: right;
    }
    .conmReview .comm_num .comm_count{
        color: red;
    }
    .conmReview_btn{
        text-align: left;
    }
    .conmReview_btn button{
        margin-left: 10%;
    }
    .comm_hot{
        overflow: hidden;
    }
    .comm_hot_tit{
        float: left;
        height: 100%;
    }
    .comm_hot_tit{
        width: 50%;
    }
    .comm_hot_tit a{
        height: 100%;
        display: block;
        text-align: center;
        padding: 10px 0;
        border-bottom: 1px solid #e3e3e3;
        color: #333333;
        font-size: 15px;
    }
    .com_fir{
        text-align: right;
    }
    .comm_hot_con{
        padding: 0 15px 0 15px;
    }
    .comm_repeat{
        overflow: hidden;
        margin-top: 15px;
        padding-bottom: 15px;
        border-bottom:1px solid #e3e3e3;
    }
    .comm_hot_phto,.comm_hot_conts{
        float: left;
    }
    .comm_hot_phto p{
        width: 33px;
        height: 33px;
        border-radius: 50%;
        overflow: hidden;
    }
    .comm_hot_phto p img{
        width: 100%;
        height: 100%;
    }
    .comm_hot_phto{
        width: 8%;
        margin-top: 7px;
    }
    .comm_hot_conts{
        width: 90%;
    }
    .commt_con{
        position: relative;
        color: #999999;
    }
    .commt_con a{
        margin-right: 10px;
    }
    .commt_con_icon{
        padding: 10px 0;
    }
    .com_hot_thumb{
        margin-left: 60%;
    }
    .comm_hot_reply{
        background:#f6f6f6;
        padding: 10px 10px 0 10px;

    }
    .new_comments{
        padding: 10px 15px;
    }
    /*详情页展开全文*/
    .detailsHidde{
        overflow: hidden;
        max-height: 500px;
    }
    .complUserName{
        color: #999999;
        font-size: 14px;
    }
    .complUserTime{
        color: #999999;
        font-size: 13px;
        position: absolute;
        right: 0;
    }
    #commt_com_repla a{
        color: #999999;
        font-size: 13px;

    }
    .commt_com_repla_con{
        color: #666666;
        font-size: 14px;
        padding: 10px 0;
    }
    .com-more{
        background:#f6f6f6;
        color: #333333;
        font-size: 14px;
    }
    .com-more img{
        transform: scale(0.5);
        -webkit-transform: scale(0.5);
        -moz-transform: scale(0.5);
        -ms-transform:scale(0.5);
        -o-transform: scale(0.5);
    }
    /*更多子评论*/
    .com-childen-more{
        font-size: 15px;
        color: #fc9105;
        background: #f6f6f6;
        padding: 10px;
    }
    .comm_text_footer{
        color: #cccccc;
        font-size: 13px;
        background: #ededed;
        position: fixed;
        bottom: 0;
        width: 100%;
        z-index: 10;
    }
    .com-footer-left{
        display: inline-block;
        height:100%;
        width: 80%;
        background: #ffffff;
        border-radius: 4px;
        margin-right: 5%;
    }
    .com-footer-left img{
        transform: scale(0.5);
        -webkit-transform: scale(0.5);
        -moz-transform: scale(0.5);
        -ms-transform:scale(0.5);
        -o-transform: scale(0.5);
    }
    .com-footer-left input{
        outline: none;
        border: none;
    }
    /*评论模态框*/
    .commentMod{
        z-index: 15;
        opacity: 0.3;
        filter: alpha(opacity=30);
        filter: alpha(opacity=30);
        top: 0;
        background: #000;
        position: absolute;
        width: 100%;
        height: 100%;
        display: none;
    }
    .comm_heade_btn{
        overflow: hidden;padding: 0 0 15px 0;
        width: 100%;
    }
    .comm_heade_btn button,.reportComText button,.reportComTextReply button{
        float:right;
        padding: 5px 15px;
        background: #000;
        color: #ffffff;
        border: none;
    }
    .comm_input_par{
        width: 100%;
        padding: 20px 0;
    }
    .comm_input_par input{
        height: 40px;
        width: 100%;
    }
    .comm_interact{
        overflow: hidden;
        padding-top:20px;
    }
    .comm_interact_lf{
        float:left;
    }
    .comm_interact_rt{
        float:right;
        overflow: hidden;
        width: 100px;
    }
    .comm_interact_rt_replay{
        float: right;
    }
    .comm_interact_rt_icon{
        float: left;
    }
    .commet_count{
        padding: 15px;
    }
    .commet_count span{
        color: #fc9105;
        padding-left: 0.1rem;
    }
    .comm_header{
        padding:0 15px;
        position: relative;
    }
    .reportComText,.reportComTextReply{
        overflow: hidden;
    }
    input{
        padding: 0 15px;
    }

</style>
<script src="trd/live/tcplayer.js"></script>
<script  src="trd/imgUpload/index.js"></script>
<script>
//    直播
    setTimeout(function(){
        $('.vcp-player').css({width:'100%',height:'100%'});
        var player = new TcPlayer('id_test_video', {
            "m3u8"      : liveAllUrl[0].webLiveUrl,//请替换成实际可用的播放地址
//            "m3u8_hd"   : "http://9390.liveplay.myqcloud.com/live/9390_454_1497061750007_900.m3u8",
//            "m3u8_sd"   : "http://9390.liveplay.myqcloud.com/live/9390_408_1496733576647_550.m3u8.av.m3u8",
            "autoplay"  : true,      //iOS下safari浏览器，以及大部分移动端浏览器是不开放视频自动播放这个能力的
            "coverpic"  : "http://www.test.com/myimage.jpg",
        });

    },1000);



//    百度分享
    setTimeout(function(){
        window._bd_share_config = {
            common : {
                //此处放置通用设置
                bdText : shareTitle,
                bdDesc : shareTitle,
                bdUrl : shareUrl,
                bdPic : '分享图片'
            },
            share : [{
                //此处放置分享按钮设置
                "bdSize" : 16
            }],
//        slide : [{
//            //此处放置浮窗分享设置
//            bdImg : 0,
//            bdPos : "right",
//            bdTop : 100
//        }],
            image : [{

                viewType : 'list',
                viewPos : 'top',
                viewColor : 'black',
                viewSize : '16',
                viewList : ['qzone','tsina','huaban','tqq','renren','sqq']
            }]
        }
        with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?cdnversion='+~(-new Date()/36e5)];
        window._bd_share_main.init();
    },1000)


    //图片上传
//定义上传方法函数
    var id="1";
    function PreviewImage(imgFile) {

        console.log(uploadFile)
        var pattern = /(\.*.jpg$)|(\.*.png$)|(\.*.jpeg$)|(\.*.gif$)|(\.*.bmp$)/;
        if(!pattern.test(imgFile.value)) {
            alert("系统仅支持jpg/jpeg/png/gif/bmp格式的照片！");
            imgFile.focus();
        }else{
            console.log("获取当前对象")
            console.log($(imgFile).parent().parent().children().find(".imgCont").prevObject[1]);
            var currentImgCont=$(imgFile).parent().parent().children().find(".imgCont").prevObject[1];
            console.log("当前图片对象");
            console.log($(imgFile).parent().parent().find('.uploadInput')[0]);
            var currentUploadInput=$(imgFile).parent().parent().find('.uploadInput')[0];

            //定义图片路径
            var path;
            //添加显示图片的HTML元素
            id += 1;
            $(currentImgCont).append("<div><div id='"+id+"'><img src='' /></div><a class='delete-btn' onclick='doRemove(this)'>删除</a></div>");
            $(currentUploadInput).attr("disabled", "disabled");
            //判断浏览器类型
            if(document.all){
                //兼容IE
                imgFile.select();
                path = document.selection.createRange().text;
                document.getElementById(id).innerHTML="";
                document.getElementById(id).style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled='true',sizingMethod='scale',src=\"" + path + "\")";//使用滤镜效果

            }else{
                //兼容其他浏览器
                path = URL.createObjectURL(imgFile.files[0]);
                console.log("path")
                console.log(path)
                document.getElementById(id).innerHTML = "<img src='"+path+"' width='100%' height='100%' />";
            }

            uploadFile=imgFile.files[0];
            console.log(uploadFile);
            console.log(uploadFile)
        }
    }

    doRemove=function(arg){
        console.log($(arg).parent().parent().parent().find("input"))
        var uploadInput=$(arg).parent().parent().parent().find("input");
        console.log(uploadInput)
        $(uploadInput).attr("disabled", false);
        $(arg).parent().remove();

    }
</script>